<%@page import="cn.blog.controller.back.Managepeople"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员管理</title>
<script type="text/javascript" src="../js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/npm.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="../css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="../css/bootstrap.css" />
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/bootstrap-theme.css" />
<script type="text/javascript">
$(function(){
	$(".delete").click(function(){
		var id = $(this).parents("tr").find("td").eq(0).text();
		var index = $(this).parents("tr").index();
		
		$.ajax({
			type:"get",
			url:"delete-emp",
			data:"id="+id,
			success:function(e){
				if(e > 0) {
					$(".table").find("tr").eq(index).remove();
					alert("删除成功！");
				}
				
			}
		})
	})
	
})

</script>
<style type="text/css">
.table {
	text-align: center;
	border-bottom: 1px solid;
	border-color: #F0F0F0;
}

.btn-cz {
	float: right;
	margin: 3px;
}

.btn {
	width: 100px;
}

#body_right_head {
	border-bottom: 1px solid;
	border-color: #F0F0F0;
	padding-bottom: 5px;
}
</style>

</head>
<body>


	<div class="body-people">
		<div id="body_right_head">

			<img src="../img/文件.png" /><span class="sp"> <a href="#"
				class="sp-a">管理员管理</a></span>
		</div>
		
		<div class="btn-cz">
			<a class="btn btn-default   btn-info " href="addmanapeople"
				target="_self" role="button">+添加</a>
		</div>
		<!-- <form action="managepeople" method="post" > -->
		<table class="table table-striped table-hover table-bordered">
		<input type="hidden" id="manaId" name="manaId" />
			<tr class="info">
				<td>管理员ID</td>
				<td>账号名</td>
				<td>职业</td>
				<td>联系电话</td>
				<td>操作</td>
			</tr>
			
			<c:forEach items="${mplst}" var="ml">
				
				<tr class="myartable">
					<td> ${ml.getManaId()}</td>
					<td>${ml.getManaAccont() }</td>
					<td>${ml.getManaName() }</td>
					<td>${ml.getManaPhone() }</td>
					<td><a class="btn btn-default del-a btn btn-danger delete"
						 role="button">删除</a></td>
				</tr>
			</c:forEach>
		</table>
		<!-- </form> -->
	</div>
</body>
</html>